﻿using System.Collections.Generic;

namespace Pyxis.FluentSelenium.SimpleWebApp.Shopping.Domain
{
    public class ProductCatalog
    {
        private static readonly List<Product> products = new List<Product>();

        static ProductCatalog()
        {
            products.Add(new Product() { Description = "low-tech mouse", UnitPrice = 10.99});
            products.Add(new Product() { Description = "blank CDs (10)", UnitPrice = 5.0 });
        }


        public static IList<Product> Search(string text)
        {
            return products.FindAll(p => p.Description.Contains(text));
        }
    }
}